<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCustomEnumValuesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('custom_enum_values', function (Blueprint $table) {
            $table->integer('id')->unique()->comment('id');
            $table->integer('enum_id')->default(0)->comment('枚举ID');
            $table->string('index')->default(0)->comment('键名');
            $table->string('value')->default("")->comment('键值');
            $table->tinyInteger('is_tenant_update')->default(0)->comment('租户是否改动');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('custom_enum_values');
    }
}
